civilization_v_customisationfandomcom-20200216-history
JFD's and Pouakai's Mercenaries
Mercenaries is a mod that introduces a system of recruitment for high-leveled and sometimes unique Mercenary units. Mercenaries are recruited by spending Gold (or Faith) on 'Contracts,' time-sensitive periods during which you gain control of a particular unit, for a particular maintenance cost. Mercenaries do not gain levels or can they upgrade, but they are often more powerful than standard units (though expensive), and sometimes come en masse. This mod does not require any other mod to function, however, it is greatly enhanced when using Cultural Diversity, Exploration Continued Expanded, Piety, and/or Gazebo's Community Patch. * Community Patch enables the 'Ban Mercenaries' Resolution to function. * Cultural Diversity allows Mercenary Contracts to choose unique units only befitting the culture of their originating civilization. It also enables Mercenary Units to use a distinct dialect instead of that of your civilization. * Exploration Continued Expanded enables 20 Contracts available only to those with a Tribe within their borders. (TBD) * Piety enables 13 religion-specific Contracts purchased with Faith. Contracts There are a total of 67 available Contracts in this mod, from across a range of eras. A further 13 is added by Piety and a further 20 will be added through Exploration Continued Expanded. Each Contract is based upon a historical group that were either Mercenaries themselves or were soldiers that were present in foreign armies, or people whom, with some artistic licence, might have gone on to industrialize their work. Each Contract comes with its own rating, which determines the cost, quality, and strength of its units, as well as its own unique promotion. Customization There are a number of different options you can choose in the UserSettings.sql file. Here, you can specify whether the standard purchasing of Units with gold is disabled, whether the AI should pay maintenance on their Contracts, and whether the Privateer should be made a Contract-exclusive unit. Compatibility This mod is is not known to be incompatible with any mods. However, in order to use this mod properly with the Community Balance Patch, you must enable the setting: 'JFD_MERCENARIES_COMMUNITY_BALANCE_PATCH' in the included UserSettings.sql file. Modularity Each leader is accorded a new flavour: Mercenaries. This determines the likelihood that an AI will consider to take out a Mercenary Contract. To add support to this new flavour, please see my Master Support File. If a leader does not have support for this flavour, they will default to a value of 5. This mod has been designed to be extremly modular; it is very simple to add a new Contract. In what follows, we are going to detail how to make a new Contract. Because Pouakai believes XML is easier, we shall do so in that format. Adding a New Contract A new Contract is added not disimilarly to a new Social Policy: CONTRACT_JFD_AMSAIG CONTRACT_JFD_MERCENARY TXT_KEY_CONTRACT_JFD_AMSAIG_DESC TXT_KEY_CONTRACT_JFD_AMSAIG_ADJ TXT_KEY_CONTRACT_JFD_AMSAIG_TEXT ERA_CLASSICAL ERA_ANCIENT PROMOTION_JFD_AMSAIG 3 25 ICON_GOLD Here, we can see a few familiar tags: Description determines the name of the Contract, Adjective determines the denonym by which its units are known, and Civilopedia is a short blurb about the Contract's givers. Others are intuitive: PromotionType determines the unique promotion that a Contract's units come withthis promotion is absolutely necessary. If a Contract does not have this filled, it will be ignored., Rating determines the quality of that Contract, Turns determine its length, and the PrereqEra and ObsoleteEra tags determine when that Contract becomes available and when it does notyou may leave ObsoleteEra as null if the Contract does not become obsolete.. Finally, YieldCost is used to specify whether the Contract should be purchased with Gold (ICON_GOLD) or Faith (ICON_PEACE). There are also a few additional tags which are not needed, but which you may wish to make use of: IsSlavery '''determines whether the Contract's units are slaves (and will become unavailable with Sovereignty's 'Emancipation Reform'), '''PrereqReligion specifies that the player must have founded a specific religion (or must have a specific State Religion with Piety) before they can take this Contract, and PrereqCivilization'' ''specifies that the player must be a specific civilization. Once the body of your Contract is created, there are two more steps. The first is in assigning what units that Contract should be allowed to offer. This can be specified by a particular unit type, a particular unit class, or a particular combat type. Although you may only choose from one of these, there is no limit to the number of unit types, classes, or combat types that a Contract can pick from. CONTRACT_JFD_AMSAIG UNITCOMBAT_ARCHER CONTRACT_JFD_AMSAIG JFD_Northern UNITCOMBAT_MELEE Here, we are detailing that the Amsaig Contract may choose any unit from the Archer (a.k.a. Ranged) combat type, whilst only picking units from the Melee combat type that belong to a civilization from the Northern culture group. However, if a unit like this cannot be found, it will instead choose a default melee unit. If you instead wish the Contract to become unavailable if this happens, you must set the 'UseOnlyCultureType '''tag to true. This tag is available for both the unit classes and the unit combats table. Finally, to complete your Contract you must create the promotion specified in the JFD_Contracts table above. There is, however, one thing that you must do in this process, and that is to assign that promotion to a specific dialect: PROMOTION_JFD_AMSAIG AS2D_SOUND_JFD_CELTIC With Cultural Diversity's unit dialogue component, this will override the standard dialogue used by this Contract's units for a unique one. In this case, if we were playing as the Americans, our Amsaig Mercenaries, instead of speaking American English, would speak Celtic. Note: If you wish to add a new Contract but do not want your mod to depend upon Mercenaries, you will need to copy the tables found under the CONTRACTS heading in Core/Mercenaries_Master.sql. Modding Costs, Maintenance, and Turns Finally, there is one other thing that you can modify, and that is the cost, maintenance, and duration of Contracts. In ''Mercenaries, the Jiayuguan Fort Wonder already increases the length of a Contract's duration, but you may also want to modify the costs and maintenance with one of the following tables: CREATE TABLE IF NOT EXISTS Building_JFD_ContractModifiers ( BuildingType text REFERENCES Buildings(Type) default null, CostModifier integer default 0, MaintenanceModifier integer default 0, TurnsModifier integer default 0); CREATE TABLE IF NOT EXISTS Policy_JFD_ContractModifiers ( PolicyType text REFERENCES Policies(Type) default null, CostModifier integer default 0, MaintenanceModifier integer default 0, TurnsModifier integer default 0); CREATE TABLE IF NOT EXISTS Trait_JFD_ContractModifiers ( TraitType text REFERENCES Traits(Type) default null, CostModifier integer default 0, MaintenanceModifier integer default 0, TurnsModifier integer default 0); Simply choose which is most appropriate for your needs, add the CREATE TABLE code above to your mod, and fill in the table itself as per the preceding tutorial. Full Credits List *Author: JFD *Not Sure. Idea I Guess: Pouakai *Artwork: Janboruta, Sukritact *Graphics: bernie14, JTitan References Category:JFD